﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace WXFramework.Model
{
    /// <summary>
    /// 图片消息
    /// </summary>
    public class RequestImageMessage : RequestMessage
    {
        public RequestImageMessage(XElement xml)
            : base(xml)
        {
            this.PicUrl = xml.Element("PicUrl").Value;
            this.MediaId = xml.Element("MediaId").Value;
            this.MsgId = xml.Element("MsgId").Value;
        }

        public override MsgType MsgType
        {
            get { return MsgType.Image; }
        }

        public string PicUrl { get; set; }

        public string MediaId { get; set; }

        public string MsgId { get; set; }
    }
}
//<xml>
// <ToUserName><![CDATA[toUser]]></ToUserName>
// <FromUserName><![CDATA[fromUser]]></FromUserName>
// <CreateTime>1348831860</CreateTime>
// <MsgType><![CDATA[image]]></MsgType>
// <PicUrl><![CDATA[this is a url]]></PicUrl>
// <MediaId><![CDATA[media_id]]></MediaId>
// <MsgId>1234567890123456</MsgId>
// </xml>